#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
using namespace std;
int main() {
    string str;
    cin >> str;
    string res = "-1";
    int arr[128] = { 0 };
    int len = str.size();
    for (int i = 0; i < len; i++) {
        arr[str[i]]++;
    }
    for (int i = 0; i < len; i++) {
        if (arr[str[i]] == 1) {
            res = str[i];
            break;
        }
    }
    cout << res << endl;
    return 0;
}